Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New package] .NET 9 #6344

Merged
merged 6 commits into from
Dec 7, 2024
Merged

Conversation

brice-fromentin
Copy link
Contributor

@brice-fromentin brice-fromentin commented Dec 6, 2024

Description

Initial release of .NET 9 package for DSM 7.0+ (and DSM 6).

Closes #6343

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

spk/dotnet9-runtime/Makefile Outdated Show resolved Hide resolved
@mreid-tt mreid-tt changed the title .NET 9 : New package. [New package] .NET 9 Dec 6, 2024
@hgy59
Copy link
Contributor

hgy59 commented Dec 6, 2024

@brice-fromentin there is an issue with the file for the icon.

The file is called dotnet.png but the content is jpeg.
and please use a resolution that is multiple of 256 (we prefer 512x512 pixel)

I have such an icon, but I can't push this to your PR.
This is another issue. Since you have created a tag (v9.0.0-1) that has exactly the same name as the branch, I get a warning when checking out the branch v9.0.0-1 on my fork:

A tag with the same name as your entered branch name already exists (so the short ref is ambiguous). This can cause problems so you should avoid it.

and when ignoring the warning, there is an error when pushing the branch because the reference is ambigous.

The messages might be related to my git client (tortoise git), but I guess this is bad practice anyway and ask you to delete the tag.

@brice-fromentin
Copy link
Contributor Author

@hgy59 ok, use the dotnet8 runtime picture, and remove tag.

@hgy59
Copy link
Contributor

hgy59 commented Dec 6, 2024

@brice-fromentin what is the reason that you dropped the support for DSM 6?

@mreid-tt mreid-tt added the new-package PR/WIP for a new package label Dec 6, 2024
@brice-fromentin
Copy link
Contributor Author

@brice-fromentin what is the reason that you dropped the support for DSM 6?
@hgy59 DSM 6 has reach end of life two months ago, and I don't have anything to test on it.

@hgy59
Copy link
Contributor

hgy59 commented Dec 6, 2024

@brice-fromentin what is the reason that you dropped the support for DSM 6?
@hgy59 DSM 6 has reach end of life two months ago, and I don't have anything to test on it.

I successfully tested it on aarch64-6.2.4. If you don't mind I would like to add DSM 6 support.

BTW: SynoCommunity packages offer a certain value for Diskstation models that are no longer supported by Synology.
IMHO we will support packages for DSM 6 as long as it does not take too much effort (as we do for DSM 5.2).

@brice-fromentin
Copy link
Contributor Author

I successfully tested it on aarch64-6.2.4. If you don't mind I would like to add DSM 6 support.
@hgy59 of course you can add support to DSM 6 and I will maintain this support for updates.

Copy link
Contributor

@hgy59 hgy59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mreid-tt
Copy link
Contributor

mreid-tt commented Dec 7, 2024

@hgy59 Thank you for your review and comments. I'll proceed with the merge later today unless any new issues are identified.

@hgy59
Copy link
Contributor

hgy59 commented Dec 7, 2024

@hgy59 Thank you for your review and comments. I'll proceed with the merge later today unless any new issues are identified.

as I don't expect release 9.0.1 before january '25, it is good to go.

@hgy59
Copy link
Contributor

hgy59 commented Dec 7, 2024

@mreid-tt one thing I was not able to test is, whether .net 9 works on DSM 7.1.

My single system with DSM 7.1.1 is armada370 that is not supported for dotnet.
When I temp. enabled the package for armada370, it shows the error dotnet: /lib/libc.so.6: version GLIBC_2.34' not found (required by dotnet)`

I have no idea whether this is related to armada370 or DSM 7.1.1.
Since dotnet9 successfully runs on DS-218 (aarch64) with DSM 6.2.4 having glibc 2.20, I think it will also run on DSM 7.1.1.

But if (and only if) we get feedback that it does not run on DSM 7.1.1, we will have a special challenge. So far we cannot enable a package for DSM 6 and limit it to DSM 7.2 for DSM > 7.

@mreid-tt
Copy link
Contributor

mreid-tt commented Dec 7, 2024

@hgy59, no problem. I'll fire up a DSM 7.1.1 test on my DS916+ VM and let you know. What is the recommended method to test .NET?

@hgy59
Copy link
Contributor

hgy59 commented Dec 7, 2024

@hgy59, no problem. I'll fire up a DSM 7.1.1 test on my DS916+ VM and let you know. What is the recommended method to test .NET?

happy you are asking this ❤️

The simple test that showed the error above was dotnet --version.
Sorry I could have included the command line:

$ dotnet --version
dotnet: /lib/libc.so.6: version `GLIBC_2.34' not found (required by dotnet)

To test whether dotnet9 runtime works without cross/libicu (that we include in dotnet8-runime packages), I found, that creating a CultureInfo object can be used for validation (based on https://github.com/dotnet/vscode-csharp/wiki/Testing-libicu-compatibility-on-Linux)

my current test program looks like this:

using System;

namespace CultureInfoTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Test if we can successfully create several culture info
            PrintCultureInfo("en-US");
            PrintCultureInfo("de-CH");
            PrintCultureInfo("fr-CH");
            PrintCultureInfo("it-CH");
            PrintCultureInfo("el-EL");
            PrintCultureInfo("pt-PT");
            PrintCultureInfo("pt-BR");
        }

        static void PrintCultureInfo(string culture)
        {
            try
            {
                var info = new System.Globalization.CultureInfo(culture);

                Console.WriteLine($"CultureInfo [{info.Name}]:");
                Console.WriteLine("------------------------------");
                Console.WriteLine($"NativeName: {info.NativeName}");

                Console.WriteLine($"DisplayName: {info.DisplayName}");
                Console.WriteLine($"EnglishName: {info.EnglishName}");
                Console.WriteLine($"IsNeutralCulture: {info.IsNeutralCulture}");
                Console.WriteLine($"LCID: {info.LCID}");
                Console.WriteLine($"DateTimeFormat.NativeCalendarName: {info.DateTimeFormat.NativeCalendarName}");
                Console.WriteLine($"DateTimeFormat.DayNames: {string.Join(",", info.DateTimeFormat.DayNames)}");
                Console.WriteLine($"DateTimeFormat.MonthNames: {string.Join(",", info.DateTimeFormat.MonthNames)}");

                Console.WriteLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"ERROR: failed to create CultureInfo [{culture}], Error [{ex.Message}]");
            }
        }
    }
}

To create an executable, that you can run on the Diskstation, you need the dotnet9-sdk
I created it under windows like this:

  1. mkdir libicu-test
  2. cd libicu-test
  3. dotnet new console
    This creates two files:
    • libicu-test.csproj
    • Program.cs
  4. Edit the file Program.cs (see mine above)
  5. dotnet publish
    this creates the folder libicu-test\bin\Release\net9.0\publish
    with several files
    • libicu-test.deps.json
    • libicu-test.dll
    • libicu-test.exe
    • libicu-test.pdb
    • libicu-test.runtimeconfig.json
  6. You only need to copy libicu-test.runtimeconfig.json and libicu-test.dll to a folder of your diskstation
  7. in this folder call dotnet libicu-test.dll to get
    CultureInfo [en-US]:
    ------------------------------
    NativeName: English (United States)
    DisplayName: English (United States)
    EnglishName: English (United States)
    IsNeutralCulture: False
    LCID: 1033
    DateTimeFormat.NativeCalendarName: Gregorian Calendar
    DateTimeFormat.DayNames: Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
    DateTimeFormat.MonthNames: January,February,March,April,May,June,July,August,September,October,November,December,
    
    CultureInfo [de-CH]:
    ------------------------------
    NativeName: Deutsch (Schweiz)
    DisplayName: German (Switzerland)
    EnglishName: German (Switzerland)
    IsNeutralCulture: False
    LCID: 2055
    DateTimeFormat.NativeCalendarName: Gregorianischer Kalender
    DateTimeFormat.DayNames: Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag
    DateTimeFormat.MonthNames: Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember,
    
    ...
    

My intention was to test culture info for all languages available under DSM, so it is not completed yet.

You find the two files in the attachment here:
libicu-test.zip

@mreid-tt
Copy link
Contributor

mreid-tt commented Dec 7, 2024

@hgy59, thanks for the detailed response. All checks seem to work well:

$ cat /etc/VERSION
majorversion="7"
minorversion="1"
major="7"
minor="1"
micro="1"
productversion="7.1.1"
buildphase="GM"
buildnumber="42962"
smallfixnumber="6"
nano="6"
base="42962"
builddate="2023/05/29"
buildtime="14:27:51"
$ dotnet --info

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4
  RID:          linux-x64

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.0 [/volume1/@appstore/dotnet9-runtime/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.0 [/volume1/@appstore/dotnet9-runtime/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
$ dotnet libicu-test.dll
CultureInfo [en-US]:
------------------------------
NativeName: English (United States)
DisplayName: English (United States)
EnglishName: English (United States)
IsNeutralCulture: False
LCID: 1033
DateTimeFormat.NativeCalendarName: Gregorian Calendar
DateTimeFormat.DayNames: Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
DateTimeFormat.MonthNames: January,February,March,April,May,June,July,August,September,October,November,December,

CultureInfo [de-CH]:
------------------------------
NativeName: Deutsch (Schweiz)
DisplayName: German (Switzerland)
EnglishName: German (Switzerland)
IsNeutralCulture: False
LCID: 2055
DateTimeFormat.NativeCalendarName: Gregorianischer Kalender
DateTimeFormat.DayNames: Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag
DateTimeFormat.MonthNames: Januar,Februar,März,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember,

CultureInfo [fr-CH]:
------------------------------
NativeName: français (Suisse)
DisplayName: French (Switzerland)
EnglishName: French (Switzerland)
IsNeutralCulture: False
LCID: 4108
DateTimeFormat.NativeCalendarName: calendrier grégorien
DateTimeFormat.DayNames: dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi
DateTimeFormat.MonthNames: janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre,

CultureInfo [it-CH]:
------------------------------
NativeName: italiano (Svizzera)
DisplayName: Italian (Switzerland)
EnglishName: Italian (Switzerland)
IsNeutralCulture: False
LCID: 2064
DateTimeFormat.NativeCalendarName: Calendario gregoriano
DateTimeFormat.DayNames: domenica,lunedì,martedì,mercoledì,giovedì,venerdì,sabato
DateTimeFormat.MonthNames: gennaio,febbraio,marzo,aprile,maggio,giugno,luglio,agosto,settembre,ottobre,novembre,dicembre,

CultureInfo [el-EL]:
------------------------------
NativeName: Greek (EL)
DisplayName: Greek (EL)
EnglishName: Greek (EL)
IsNeutralCulture: False
LCID: 4096
DateTimeFormat.NativeCalendarName: Γρηγοριανό ημερολόγιο
DateTimeFormat.DayNames: Κυριακή,Δευτέρα,Τρίτη,Τετάρτη,Πέμπτη,Παρασκευή,Σάββατο
DateTimeFormat.MonthNames: Ιανουάριος,Φεβρουάριος,Μάρτιος,Απρίλιος,Μάιος,Ιούνιος,Ιούλιος,Αύγουστος,Σεπτέμβριος,Οκτώβριος,Νοέμβριος,Δεκέμβριος,

CultureInfo [pt-PT]:
------------------------------
NativeName: português (Portugal)
DisplayName: Portuguese (Portugal)
EnglishName: Portuguese (Portugal)
IsNeutralCulture: False
LCID: 2070
DateTimeFormat.NativeCalendarName: Calendário gregoriano
DateTimeFormat.DayNames: domingo,segunda-feira,terça-feira,quarta-feira,quinta-feira,sexta-feira,sábado
DateTimeFormat.MonthNames: janeiro,fevereiro,março,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro,

CultureInfo [pt-BR]:
------------------------------
NativeName: português (Brasil)
DisplayName: Portuguese (Brazil)
EnglishName: Portuguese (Brazil)
IsNeutralCulture: False
LCID: 1046
DateTimeFormat.NativeCalendarName: Calendário Gregoriano
DateTimeFormat.DayNames: domingo,segunda-feira,terça-feira,quarta-feira,quinta-feira,sexta-feira,sábado
DateTimeFormat.MonthNames: janeiro,fevereiro,março,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro,

@hgy59
Copy link
Contributor

hgy59 commented Dec 7, 2024

@mreid-tt looks good.

can you run /lib/libc.so.6 ?

My Systems show:
DSM 7.2.2

$ /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 12.2.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
Minimum supported kernel: 3.2.0
For bug reporting instructions, please see:
<https://www.gnu.org/software/libc/bugs.html>.

DSM 7.1.1 (DS-115j)

$ /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.26, by Roland McGrath et al.
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.5.0.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

DSM 6.2.4 (DS-218)

$ /lib/libc.so.6
GNU C Library (crosstool-NG crosstool-ng-1.22.0-169-g87eb166) stable release version 2.20-2014.11, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.9.4 20150629 (prerelease).
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

@mreid-tt
Copy link
Contributor

mreid-tt commented Dec 7, 2024

@hgy59, as requested:

$ /lib/libc.so.6
GNU C Library (GNU libc) stable release version 2.26, by Roland McGrath et al.
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.5.0.
Available extensions:
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

@mreid-tt mreid-tt merged commit a9141db into SynoCommunity:master Dec 7, 2024
15 checks passed
@mreid-tt mreid-tt added the status/published Published and activated (may take up to 48h until visible in DSM package manager) label Dec 7, 2024
urosch pushed a commit to urosch/spksrc that referenced this pull request Dec 9, 2024
* Initial release.
* Change picture to use the dotnet8 package one.
* add support for DSM 6

---------

Co-authored-by: Brice FROMENTIN <[email protected]>
Co-authored-by: hgy59 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-package PR/WIP for a new package status/published Published and activated (may take up to 48h until visible in DSM package manager)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Package Request] .NET 9
3 participants